package com.tide.crm.controller;

import com.tide.crm.entity.AyUser;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@Controller
public class HelloController {
    @GetMapping("/hello")
    public String hello(Model model) {
        List<AyUser> userList = new ArrayList<AyUser>();
        AyUser user1 = new AyUser();
        AyUser user2 = new AyUser();
        user1.setName("Liqiang");
        user1.setPassword("123456");
        user2.setName("曹素平");
        user2.setPassword("123456");
        userList.add(user1);
        userList.add(user2);
        model.addAttribute("users",userList);
//        String user = methodService.user();
        return "ayUser";
    }
}
